package liangtWorkSpace.Observer.version4;

/**
 * @ClassName Cliend
 * @Description : 功能说明
 * @Author : LiangT
 * @Date : 2020/4/16 18:44
 */

/**
 * 加入三个观察者
 */
public class Cliend {
    private boolean cry = false;

    public boolean isCry(){return cry;};

    public Dad dad = new Dad();
    public Mam mam = new Mam();
    public Dog dog = new Dog();
    public void weakUp(){
        System.out.println("crying ....");
        dad.feed();
        dog.feed();
        mam.feed();
        cry = true;
    }
    public static void main(String[] args) {
        Cliend cliend = new Cliend();
        cliend.weakUp();
    }
}

class Dad{
    public void feed(){
        System.out.println("dad feeding.....");
    }
}
class Mam{
    public void feed(){
        System.out.println("dad feeding.....");
    }
}
class Dog {
    public void feed(){
        System.out.println("dad feeding.....");
    }
}
